package mtest.day2;

public class Demo1 {
    public static void main(String[] args) {
        //二元运算符
        int a = 10;
        int b = 20;
        int c = 30;
        int d = 40;
        System.out.println(a + b);
        System.out.println(a - b);
        System.out.println(a * b);
        System.out.println(a / (double) b);
        long a1 = 12313234321412344L;
        int b1 = 123;
        short c1 = 10;
        byte d1 = 8;
        System.out.println(a1 + b1); //long
        System.out.println(b1 + c1 + d1); //141 int
        System.out.println(c1 + d1); //int

        // 关系运算符 正确 错误 布尔值
        int a2 = 10;
        int a3 = 20;
        int a4 = 22;
        System.out.println(a > b);
        System.out.println(a < b);
        System.out.println(a == b);
        System.out.println(a != b);
        /**
         * false
         * true
         * false
         * true
         */
        // 取余  a4/a2 = 2...2
        System.out.println(a4 % a2); //2





    }
}
